package com.huarui.part.action;

import java.util.List;
import java.util.Map;

import net.sf.json.JSONArray;

import org.apache.log4j.Logger;
import org.ewaf.framework.action.BaseAction;

import com.huarui.part.service.PartUploadService;
import com.huarui.user.model.SessionMessage;
import com.huarui.user.security.UserHolder;

public class PartUploadDeleteAction extends BaseAction {

	/**
	 * 
	 */
	private static final long serialVersionUID = -1733339111312627121L;

	private static final Logger logger = Logger
			.getLogger(PartUploadAddAction.class);

	private PartUploadService partUploadService;

	private Map<String, Object> resultMap;


	private String ids;

	public String deleteWithComId() {

		SessionMessage sm = UserHolder.getCurrentSessionMessage();

		JSONArray ja = JSONArray.fromObject(ids);
		List<Integer> list = JSONArray.toList(ja, Integer.class);

		resultMap = partUploadService.deleteWithComId(list, sm);

		return JSON;
	}

	public Map<String, Object> getResultMap() {
		return resultMap;
	}

	public void setResultMap(Map<String, Object> resultMap) {
		this.resultMap = resultMap;
	}

	public void setPartUploadService(PartUploadService partUploadService) {
		this.partUploadService = partUploadService;
	}



	public String getIds() {
		return ids;
	}

	public void setIds(String ids) {
		this.ids = ids;
	}

}
